package com.news.news.dao;

import com.news.news.modle.Admin;
import com.news.news.modle.Menu;
import com.news.news.modle.Role;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 罗铠威 on 2023/8/29 16:22
 * type:
 */
//@Mapper
public interface AdminDao {

    ArrayList<Admin> adminList(Admin admin);

    List<Role> finRoles();

    void saveAdmin(Admin admin);

    void addAdminRole(@Param("roleid") Integer roleid,@Param("adminid") Integer adminid);

    Admin findAdminById(Integer id);

    void updateAdmin(Admin admin);


    void updateAdminRole(@Param("roleid") Integer role,@Param("adminid") Integer id);

    void deleteAdminRole(Integer id);


    void deleteAdmin(Integer id);

    ArrayList<Menu> showMenu(@Param("id") Integer id,@Param("type") Integer type);
}
